﻿using Fozzy;
using System.Collections.Generic;

namespace Microsoft.FamilyShow
{
    /// <summary>
    /// Concept built to manage the FamilyShow Resources conveyed by the ResourceManager
    /// </summary>
    internal class Settings                                                     : Settings<Microsoft.FamilyShow.Properties.Settings>
    {
        #region States
            public bool                             Show_Old                    { get { return Value.DontShowOldVersionMessage                  ; } }
            internal bool                           Have_Skin                   { get { return this.Exist(Skin)                                 ; } }
        #endregion

        #region Structure
            public Skin                             Skin                        { get { return Instance<Skin>()                                 ; } }
        #endregion

        #region Constructeur
            public Settings()                                                   : base(Microsoft.FamilyShow.Properties.Settings.Default)
            {}
        #endregion
            
            protected override void Prepare()
            {
                base.Prepare()                                                  ;
                if (Have_Skin) Skin.Load()                                      ;
            }

            public void Save(Name skin)
            {
                Value.Skin = skin                                               ;
                Value.Save()                                                    ;
            }
    }

}
